var gulp = require('gulp'),
    uglify = require('gulp-uglify'),
    rename = require('gulp-rename'),
    notify = require('gulp-notify');

gulp.task('default', function () {
    return gulp.src('./src/*.js', { allowEmpty: true })
        .pipe(rename({ suffix: '.min' }))
        .pipe(uglify())
        .pipe(gulp.dest('dist'))
        .pipe(notify({ message: "压缩完成" }));
});